home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 1999 #2 / Amiga Plus CD - 1999 - No. 2.iso / System-Boost / Workbench / ToolManager / Source / Library / network.c < prev    next >
C/C++ Source or Header  |  1998-06-17  |  1KB  |  70 lines

  1. /*
  2.  * network.c  V3.1
  3.  *
  4.  * ToolManager network handling routines
  5.  *
  6.  * Copyright (C) 1990-98 Stefan Becker
  7.  *
  8.  * This source code is for educational purposes only. You may study it
  9.  * and copy ideas or algorithms from it for your own projects. It is
  10.  * not allowed to use any of the source codes (in full or in parts)
  11.  * in other programs. Especially it is not allowed to create variants
  12.  * of ToolManager or ToolManager-like programs from this source code.
  13.  *
  14.  */
  15.  
  16. #include "toolmanager.h"
  17.  
  18. /* Local data */
  19. static LONG EntitySignal;
  20.  
  21. /* Start networking */
  22. #define DEBUGFUNCTION StartNetwork
  23. LONG StartNetwork(void)
  24. {
  25.  NETWORK_LOG(LOG0(Entry))
  26.  
  27.  /* Allocate signal bit */
  28.  EntitySignal = AllocSignal(-1);
  29.  
  30.  NETWORK_LOG(LOG1(Result, "%ld", EntitySignal))
  31.  
  32.  return(EntitySignal);
  33. }
  34.  
  35. /* Stop networking */
  36. #undef  DEBUGFUNCTION
  37. #define DEBUGFUNCTION StopNetwork
  38. void StopNetwork(void)
  39. {
  40.  APPMSGS_LOG(LOG1(Signal, "%ld", EntitySignal))
  41.  
  42.  /* Disable network first */
  43.  DisableNetwork();
  44.  
  45.  /* Free signal bit */
  46.  FreeSignal(EntitySignal);
  47. }
  48.  
  49. /* Enable networking */
  50. #undef  DEBUGFUNCTION
  51. #define DEBUGFUNCTION EnableNetwork
  52. void EnableNetwork(void)
  53. {
  54. }
  55.  
  56. /* Disable networking */
  57. #undef  DEBUGFUNCTION
  58. #define DEBUGFUNCTION DisableNetwork
  59. void DisableNetwork(void)
  60. {
  61. }
  62.  
  63. /* Handle network event */
  64. #undef  DEBUGFUNCTION
  65. #define DEBUGFUNCTION HandleNetwork
  66. void HandleNetwork(void)
  67. {
  68.  NETWORK_LOG(LOG0(NOT IMPLEMENTED))
  69. }
  70.